Problem Note 55236: Leading blanks are removed when using PROC PRINT in all ODS destinations except Listing
Leading blanks are removed from data values when you use the PRINT procedure to send output to ODS destinations other than the Listing destination. This can occur even when the ASIS=ON style attribute has been applied. The column headings display the leading blanks correctly when the ASIS=ON style attribute has been applied.
The example code below illustrates the problem:
ods listing;
data one;
x=" String has embedded spaces";
output;
x="String has no embedded spaces";
output;
run;
ods html file="c:\temp.html";
proc print data= one;
var x / style(data)={asis=on};
run;
ods html close;
To circumvent the problem, use a procedure other than PROC PRINT, such as PROC REPORT, to maintain the leading blanks.
Operating System and Release Information
SAS System | Base SAS | Microsoft® Windows® for x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8 Pro x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Enterprise 32-bit | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Pro 32-bit | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 8.1 Pro x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows 10 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 R2 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2008 for x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 Datacenter | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 R2 Datacenter | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 R2 Std | 9.4 TS1M0 | 9.4 TS1M3 |
Microsoft Windows Server 2012 Std | 9.4 TS1M0 | 9.4 TS1M3 |
Windows 7 Enterprise x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Windows 7 Professional x64 | 9.4 TS1M0 | 9.4 TS1M3 |
64-bit Enabled AIX | 9.4 TS1M0 | 9.4 TS1M3 |
64-bit Enabled Solaris | 9.4 TS1M0 | 9.4 TS1M3 |
HP-UX IPF | 9.4 TS1M0 | 9.4 TS1M3 |
Linux for x64 | 9.4 TS1M0 | 9.4 TS1M3 |
Solaris for x64 | 9.4 TS1M0 | 9.4 TS1M3 |
z/OS 64-bit | 9.4 TS1M0 | 9.4 TS1M3 |
z/OS | 9.4 TS1M0 | 9.4 TS1M3 |
*
For software releases that are not yet generally available, the Fixed
Release is the software release in which the problem is planned to be
fixed.
Type: | Problem Note |
Priority: | high |
Date Modified: | 2015-02-19 14:48:30 |
Date Created: | 2015-02-16 11:26:07 |